<style>
<!--
.tableform table {margin-top:5px;}
.tableform th,.tableform td{padding:5px;border:1px solid #ddd; vertical-align:middle;line-height:1.8}
.tableform th {background-color:#E2E8EB}
.widgetconfig input {padding:2px;line-height:18px;}
.tableform i {color:#FF0000;}
-->
</style>

<div id="goods_exshow_config" class="tableform">
    <div class="division">
        <label>
            版块标题：
            <input type="text" class="x-input" name="title" value="<{$setting.title}>" /> (*留空则不显示标题)
        </label>
    </div>
    <div class="division">
        <div class="goods-selector-handle clearfix">
            <div class="span-auto">
                <label>
                    <input type="radio"  name="selector" value="filter" <{if $setting.selector!="select"}> checked<{/if}> />&nbsp;范围选择商品
                </label>
            </div>
            <div class="span-auto">
                <label><input type="radio"  name="selector" value="select" <{if $setting.selector=="select"}> checked<{/if}> />&nbsp;精确选择商品</label>
            </div>
        </div>
        <div class="division goods-selector">
            <div data-extend="filter"<{if $setting.selector=="select"}> style="display:none"<{/if}>> 
                <{input type="goodsfilter"  name="goods_filter" value=$setting.goods_filter}>
            </div>
            <div data-extend="select"<{if $setting.selector =="filter"}> style="display:none;"<{/if}>>
                <{input type="goods_select" object="goods@b2c" pdt_name="goods_select" pdt_value=$setting.goods_select obj_name="goods_select_linkobj" obj_value=$setting.goods_select_linkobj}>
            </div>
         
        </div>
    </div>
    
    <div class="division" style="margin-top:8px;">
    <table width="100%" cellpadding="0" cellspacing="0">
      
       <tr>
      	<th>显示销售价：</th>
        <td><select name="showgoodsSalePrice">
            <option<{if $setting.showgoodsSalePrice == "on"}> selected="selected"<{/if}> value="on">显示</option>
            <option<{if $setting.showgoodsSalePrice == "off"}> selected="selected"<{/if}> value="off">不显示</option>
          </select>
         </td>
         </tr>
         <tr>
      	<th>显示市场价：</th>
        <td> 
        	<select name="showgoodsMarketPrice">
            <option<{if $setting.showgoodsMarketPrice == "on"}> selected="selected"<{/if}> value="on">显示</option>
            <option<{if $setting.showgoodsMarketPrice == "off"}> selected="selected"<{/if}> value="off">不显示</option>
          </select>
        </td>
      </tr>
      <tr>
      	<th><{t app='b2c'}>商品数量：<{/t}></th>
      
        <td>
      <input type="text" name="limit" value="<{$setting.limit}>">
        </td>
      </tr>
      <tr>
        <th><{t app='b2c'}>商品名最长显示长度：<{/t}></th>
        <td><{input name="maxlength" value=$setting.maxlength|default:"42"}></td>
      </tr>
   
     
    </table>
  </div>
</div>

<script>
    $$('#goods_exshow_config .goods-selector-handle input[type=radio]').addEvent('change',function(){
        var radio  = this;
        if(!radio.checked)return;
        $$('#goods_exshow_config .goods-selector [data-extend]').each(function(item){
            if(item.get('data-extend')!=radio.value){
                item.hide();
                }else{
                item.show();
            }
        });
    });
</script>

